3.39 \(\int (c+d x) (a+b \coth (e+f x)) \, dx\)

Optimal. Leaf size=75 \[ \frac {a (c+d x)^2}{2 d}+\frac {b (c+d x) \log \left (1-e^{2 (e+f x)}\right )}{f}-\frac {b (c+d x)^2}{2 d}+\frac {b d \text {Li}_2\left (e^{2 (e+f x)}\right )}{2 f^2} \]

[Out]

1/2*a*(d*x+c)^2/d-1/2*b*(d*x+c)^2/d+b*(d*x+c)*ln(1-exp(2*f*x+2*e))/f+1/2*b*d*polylog(2,exp(2*f*x+2*e))/f^2

________________________________________________________________________________________

Rubi [A]  time = 0.13, antiderivative size = 75, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.312, Rules used = {3722, 3716, 2190, 2279, 2391} \[ \frac {b d \text {PolyLog}\left (2,e^{2 (e+f x)}\right )}{2 f^2}+\frac {a (c+d x)^2}{2 d}+\frac {b (c+d x) \log \left (1-e^{2 (e+f x)}\right )}{f}-\frac {b (c+d x)^2}{2 d} \]

Antiderivative was successfully verified.

[In]

Int[(c + d*x)*(a + b*Coth[e + f*x]),x]

[Out]

(a*(c + d*x)^2)/(2*d) - (b*(c + d*x)^2)/(2*d) + (b*(c + d*x)*Log[1 - E^(2*(e + f*x))])/f + (b*d*PolyLog[2, E^(
2*(e + f*x))])/(2*f^2)

Rule 2190

Int[(((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.))/((a_) + (b_.)*((F_)^((g_.)*((e_.) +
 (f_.)*(x_))))^(n_.)), x_Symbol] :> Simp[((c + d*x)^m*Log[1 + (b*(F^(g*(e + f*x)))^n)/a])/(b*f*g*n*Log[F]), x]
 - Dist[(d*m)/(b*f*g*n*Log[F]), Int[(c + d*x)^(m - 1)*Log[1 + (b*(F^(g*(e + f*x)))^n)/a], x], x] /; FreeQ[{F,
a, b, c, d, e, f, g, n}, x] && IGtQ[m, 0]

Rule 2279

Int[Log[(a_) + (b_.)*((F_)^((e_.)*((c_.) + (d_.)*(x_))))^(n_.)], x_Symbol] :> Dist[1/(d*e*n*Log[F]), Subst[Int
[Log[a + b*x]/x, x], x, (F^(e*(c + d*x)))^n], x] /; FreeQ[{F, a, b, c, d, e, n}, x] && GtQ[a, 0]

Rule 2391

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> -Simp[PolyLog[2, -(c*e*x^n)]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 3716

Int[((c_.) + (d_.)*(x_))^(m_.)*tan[(e_.) + Pi*(k_.) + (Complex[0, fz_])*(f_.)*(x_)], x_Symbol] :> -Simp[(I*(c
+ d*x)^(m + 1))/(d*(m + 1)), x] + Dist[2*I, Int[((c + d*x)^m*E^(2*(-(I*e) + f*fz*x)))/(E^(2*I*k*Pi)*(1 + E^(2*
(-(I*e) + f*fz*x))/E^(2*I*k*Pi))), x], x] /; FreeQ[{c, d, e, f, fz}, x] && IntegerQ[4*k] && IGtQ[m, 0]

Rule 3722

Int[((c_.) + (d_.)*(x_))^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Int[ExpandIntegrand[
(c + d*x)^m, (a + b*Tan[e + f*x])^n, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[m, 0] && IGtQ[n, 0]

Rubi steps

\begin {align*} \int (c+d x) (a+b \coth (e+f x)) \, dx &=\int (a (c+d x)+b (c+d x) \coth (e+f x)) \, dx\\ &=\frac {a (c+d x)^2}{2 d}+b \int (c+d x) \coth (e+f x) \, dx\\ &=\frac {a (c+d x)^2}{2 d}-\frac {b (c+d x)^2}{2 d}-(2 b) \int \frac {e^{2 (e+f x)} (c+d x)}{1-e^{2 (e+f x)}} \, dx\\ &=\frac {a (c+d x)^2}{2 d}-\frac {b (c+d x)^2}{2 d}+\frac {b (c+d x) \log \left (1-e^{2 (e+f x)}\right )}{f}-\frac {(b d) \int \log \left (1-e^{2 (e+f x)}\right ) \, dx}{f}\\ &=\frac {a (c+d x)^2}{2 d}-\frac {b (c+d x)^2}{2 d}+\frac {b (c+d x) \log \left (1-e^{2 (e+f x)}\right )}{f}-\frac {(b d) \operatorname {Subst}\left (\int \frac {\log (1-x)}{x} \, dx,x,e^{2 (e+f x)}\right )}{2 f^2}\\ &=\frac {a (c+d x)^2}{2 d}-\frac {b (c+d x)^2}{2 d}+\frac {b (c+d x) \log \left (1-e^{2 (e+f x)}\right )}{f}+\frac {b d \text {Li}_2\left (e^{2 (e+f x)}\right )}{2 f^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.06, size = 87, normalized size = 1.16 \[ a c x+\frac {1}{2} a d x^2+\frac {b c (\log (\tanh (e+f x))+\log (\cosh (e+f x)))}{f}+\frac {b d \text {Li}_2\left (e^{2 e+2 f x}\right )}{2 f^2}+\frac {b d x \log \left (1-e^{2 e+2 f x}\right )}{f}-\frac {1}{2} b d x^2 \]

Antiderivative was successfully verified.

[In]

Integrate[(c + d*x)*(a + b*Coth[e + f*x]),x]

[Out]

a*c*x + (a*d*x^2)/2 - (b*d*x^2)/2 + (b*d*x*Log[1 - E^(2*e + 2*f*x)])/f + (b*c*(Log[Cosh[e + f*x]] + Log[Tanh[e
 + f*x]]))/f + (b*d*PolyLog[2, E^(2*e + 2*f*x)])/(2*f^2)

________________________________________________________________________________________

fricas [B]  time = 0.41, size = 156, normalized size = 2.08 \[ \frac {{\left (a - b\right )} d f^{2} x^{2} + 2 \, {\left (a - b\right )} c f^{2} x + 2 \, b d {\rm Li}_2\left (\cosh \left (f x + e\right ) + \sinh \left (f x + e\right )\right ) + 2 \, b d {\rm Li}_2\left (-\cosh \left (f x + e\right ) - \sinh \left (f x + e\right )\right ) + 2 \, {\left (b d f x + b c f\right )} \log \left (\cosh \left (f x + e\right ) + \sinh \left (f x + e\right ) + 1\right ) - 2 \, {\left (b d e - b c f\right )} \log \left (\cosh \left (f x + e\right ) + \sinh \left (f x + e\right ) - 1\right ) + 2 \, {\left (b d f x + b d e\right )} \log \left (-\cosh \left (f x + e\right ) - \sinh \left (f x + e\right ) + 1\right )}{2 \, f^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*(a+b*coth(f*x+e)),x, algorithm="fricas")

[Out]

1/2*((a - b)*d*f^2*x^2 + 2*(a - b)*c*f^2*x + 2*b*d*dilog(cosh(f*x + e) + sinh(f*x + e)) + 2*b*d*dilog(-cosh(f*
x + e) - sinh(f*x + e)) + 2*(b*d*f*x + b*c*f)*log(cosh(f*x + e) + sinh(f*x + e) + 1) - 2*(b*d*e - b*c*f)*log(c
osh(f*x + e) + sinh(f*x + e) - 1) + 2*(b*d*f*x + b*d*e)*log(-cosh(f*x + e) - sinh(f*x + e) + 1))/f^2

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (d x + c\right )} {\left (b \coth \left (f x + e\right ) + a\right )}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*(a+b*coth(f*x+e)),x, algorithm="giac")

[Out]

integrate((d*x + c)*(b*coth(f*x + e) + a), x)

________________________________________________________________________________________

maple [B]  time = 0.31, size = 201, normalized size = 2.68 \[ \frac {a d \,x^{2}}{2}-\frac {b d \,x^{2}}{2}+a c x +b c x -\frac {2 b c \ln \left ({\mathrm e}^{f x +e}\right )}{f}+\frac {b c \ln \left ({\mathrm e}^{f x +e}-1\right )}{f}+\frac {b c \ln \left ({\mathrm e}^{f x +e}+1\right )}{f}-\frac {2 b d e x}{f}-\frac {b d \,e^{2}}{f^{2}}+\frac {b d \ln \left ({\mathrm e}^{f x +e}+1\right ) x}{f}+\frac {b d \polylog \left (2, -{\mathrm e}^{f x +e}\right )}{f^{2}}+\frac {b d \ln \left (1-{\mathrm e}^{f x +e}\right ) x}{f}+\frac {b d \ln \left (1-{\mathrm e}^{f x +e}\right ) e}{f^{2}}+\frac {b d \polylog \left (2, {\mathrm e}^{f x +e}\right )}{f^{2}}+\frac {2 b d e \ln \left ({\mathrm e}^{f x +e}\right )}{f^{2}}-\frac {b d e \ln \left ({\mathrm e}^{f x +e}-1\right )}{f^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d*x+c)*(a+b*coth(f*x+e)),x)

[Out]

1/2*a*d*x^2-1/2*b*d*x^2+a*c*x+b*c*x-2/f*b*c*ln(exp(f*x+e))+1/f*b*c*ln(exp(f*x+e)-1)+1/f*b*c*ln(exp(f*x+e)+1)-2
/f*b*d*e*x-1/f^2*b*d*e^2+1/f*b*d*ln(exp(f*x+e)+1)*x+1/f^2*b*d*polylog(2,-exp(f*x+e))+1/f*b*d*ln(1-exp(f*x+e))*
x+1/f^2*b*d*ln(1-exp(f*x+e))*e+1/f^2*b*d*polylog(2,exp(f*x+e))+2/f^2*b*d*e*ln(exp(f*x+e))-1/f^2*b*d*e*ln(exp(f
*x+e)-1)

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \frac {1}{2} \, a d x^{2} + \frac {1}{2} \, {\left (x^{2} - 2 \, \int \frac {x}{e^{\left (f x + e\right )} + 1}\,{d x} + 2 \, \int \frac {x}{e^{\left (f x + e\right )} - 1}\,{d x}\right )} b d + a c x + \frac {b c \log \left (\sinh \left (f x + e\right )\right )}{f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*(a+b*coth(f*x+e)),x, algorithm="maxima")

[Out]

1/2*a*d*x^2 + 1/2*(x^2 - 2*integrate(x/(e^(f*x + e) + 1), x) + 2*integrate(x/(e^(f*x + e) - 1), x))*b*d + a*c*
x + b*c*log(sinh(f*x + e))/f

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \[ \int \left (a+b\,\mathrm {coth}\left (e+f\,x\right )\right )\,\left (c+d\,x\right ) \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*coth(e + f*x))*(c + d*x),x)

[Out]

int((a + b*coth(e + f*x))*(c + d*x), x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \coth {\left (e + f x \right )}\right ) \left (c + d x\right )\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*(a+b*coth(f*x+e)),x)

[Out]

Integral((a + b*coth(e + f*x))*(c + d*x), x)

________________________________________________________________________________________